package lab02.test21;

import com.sun.xml.internal.fastinfoset.util.CharArray;

public class Test21 {
    public static void main(String[] args) {
        String name="sdkhjrehbwbfjbhvkbjsxbvjfbjj";
        char[] arr= name.toCharArray();
        int count=0;
        for (int i=0;i<arr.length;i++){
            if ('h'==arr[i]){
                count++;
            }
        }
        System.out.println("字符串中h的频率："+count);
    }
}
